using TerritoryGame.Domain.Entities;

namespace TerritoryGame.Domain.Repositories;

public interface IGameRoomRepository
{
    Task<GameRoom?> GetByIdAsync(Guid id);
    Task<GameRoom> AddAsync(GameRoom room);
    Task<GameRoom> UpdateAsync(GameRoom room);
    Task DeleteAsync(Guid id);
    Task<IEnumerable<GameRoom>> GetWaitingRoomsAsync();
    Task<GameRoom?> GetByPasswordAsync(string password);
    Task<GameRoom?> GetByCodeAsync(string roomCode);
            Task<bool> AddPlayerToRoomAsync(Guid roomId, Player player, string? password = null);
    Task<bool> DeleteRoomAsync(Guid roomId);
    Task<bool> RemovePlayerFromRoomAsync(Guid roomId, Guid playerId);
    Task<bool> DeleteRoomByCodeAsync(string roomCode);
}
